home *** CD-ROM | disk | FTP | other *** search
- Path: news.mindlink.net!news
- From: genew@mindlink.bc.ca (Gene Wirchenko)
- Newsgroups: comp.lang.c++,rec.games.programmer,alt.msdos.programmer,comp.programming
- Subject: Re: Young programmers read me.
- Date: Tue, 16 Apr 1996 14:49:32 GMT
- Organization: MIND LINK! - British Columbia, Canada
- Message-ID: <4l0c8p$rvp@fountain.mindlink.net>
- References: <4icpp9$7hr@barad-dur.nas.com> <4keejc$lpi@tpd.dsccc.com> <Pine.OSF.3.91.960411093444.20958D-100000@bud.cc.swin.edu.au> <4kmfqn$e0f@airdmhor.gen.nz> <4kubt3$2jk@plains.nodak.edu>
- NNTP-Posting-Host: line147.nwm.mindlink.net
- X-Newsreader: Forte Free Agent 1.0.82
-
- hennebry@plains.nodak.edu (Michael J. Hennebry) wrote:
-
- >In article <4kmfqn$e0f@airdmhor.gen.nz>,
- >Simon Hosie <gumboot@airdmhor.gen.nz> wrote:
- >> if(something_happened)
- >> do_something_else();
-
- >AAAaaarrrggg! This is an accident waiting to happen. Here is Simon's
- >code after its next update:
-
- Why? If you don't know the language, why program in it?
- I always indent my code properly (meaning consistently) and if I
- saw that the then clause needed to be "blockized", I'd do it
- automatically. No, it isn't. It's:
-
- > if(something_happened)
- {
- > do_something_else();
- > do_yet_another_thing();
- }
-
- >Lotsa luck.
-
- I don't need luck. I have a method.
-
- >Try this:
- > if(something_happened) do_something_else();
-
- Not as clear as it should be by my standards. YMMV.
-
- >or this:
- > if(something_happened)
- > { do_something_else(); }
-
- Extraneous braces cause pause.
-
- >or even this:
- > if(something_happened) { do_something_else(); }
-
- Ditto.
-
- >Some of the airier suggestions in this thread remind me of the
- >style in Oh! Pascal:
-
- > if(something_happened)
- > then
- > begin
- > do_something_else();
- > end
-
- >--
- >Mike hennebry@plains.NoDak.edu
- >Ivanova recommends not getting in front of Delenn.
-
- Sincerely,
-
- Gene Wirchenko
-
- C Pronunciation Guide:
- y=x++; "wye equals ex plus plus semicolon"
- x=x++; "ex equals ex doublecross semicolon"
-
-